import multiprocessing
import os


workers_per_core = float(os.getenv("WORKERS_PER_CORE", "1"))
host = os.getenv("HOST", "0.0.0.0")
port = 8080

cores = multiprocessing.cpu_count()
use_log_level = os.getenv("LOG_LEVEL", "info")

loglevel = use_log_level
bind = f"{host}:{port}"
workers = max(int(workers_per_core * cores), 2)
keepalive = 120
errorlog = "-"
